package xyz.yang.ddd.core.springframework.transaction;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@ConfigurationProperties(prefix = "xyz.yang.transaction")
public class TransactionProperties {
    /**
     * 启用事务方法前缀
     */
    @Value("${required-prefix:do*}")
    private String requiredPrefix;

    /**
     * 启用只读方法前缀
     */
    @Value("${readonly-prefix:get*}")
    private String readonlyPrefix;
    /**
     * 配置方法过期时间，默认-1,永不超时
     */
    @Value("${method-timeout:5000}")
    private int methodTimeOut;

    /**
     * 配置切入点表达式
     */
    @Value("${pointcut-expression:execution(public * com.*..application..*Application.*(..))}")
    private String pointcutExpression;
}
